package com.zoe.app.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author Zoe.Zhang
 * @date 2021/10/11
 * @description
 */
public class User {
    private String name;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    // 如果不用注解也可以用配置类
    // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date birthDay;

    public String getName() {
        return name;
    }

    public User setName(String name) {
        this.name = name;
        return this;
    }

    public Date getBirthDay() {
        return birthDay;
    }

    public User setBirthDay(Date birthDay) {
        this.birthDay = birthDay;
        return this;
    }

    @Override
    public String toString() {
        return "User{" +
            "name='" + name + '\'' +
            ", birthDay=" + birthDay +
            '}';
    }
}
